export const EditTabType = {
    SQL: 1,
    TABLE: 2,
    UPDATE: 3,
    STRUCTURE: 4,
}

export const TableForm = {
    name: '',
    charset: '',
    collation: '',
    engine: 'InnoDB',
    comment: '',
    columns: [],
    operate: '',
}

export const ColumnForm = {
    name: '',
    old_name: '',
    type: '',
    length: '',
    value: 'NONE',
    definedValue: '',
    attribute: '',
    null: '0',
    primary: '0',
    auto_increment: '0',
    comment: '',
    after: '',
}

export const ColumnType = [
    {
      label: '数字',
      options: ['TINYINT', 'SMALLINT', 'MEDIUMINT', 'INT', 'BIGINT', 'DECIMAL', 'FLOAT', 'DOUBLE', 'BIT', 'BOOLEAN']
    },
    {
      label: '日期与时间',
      options: ['DATE', 'DATETIME', 'TIMESTAMP', 'TIME', 'YEAR']
    },
    {
      label: '文本',
      options: ['CHAR', 'VARCHAR', 'TINYTEXT', 'TEXT', 'MEDIUMTEXT', 'LONGTEXT', 'BINARY', 'VARBINARY', 'TINYBLOB', 'BLOB', 'MEDIUMBLOB', 'LONGBLOB', 'ENUM', 'SET']
    }
]

export const ColumnValue = [
    { value: 'NONE', label: '无' },
    { value: 'DEFINED', label: '自定义' },
    { value: 'NULL', label: 'NULL' },
    { value: 'CURRENT_TIMESTAMP', label: 'CURRENT_TIMESTAMP' },
]

export const ColumnAttribute = ['', 'UNSIGNED', 'UNSIGNED ZEROFILL', 'on update CURRENT_TIMESTAMP', 'BINARY']

export const Collation = [
    {
    label: 'utf8mb4',
    options: ['utf8mb4_bin', 'utf8mb4_general_ci', 'utf8mb4_unicode_ci'],
    },
    {
      label: 'latin1',
      options: ['latin1_bin', 'latin1_general_ci', 'latin1_general_cs'],
    },
    {
      label: 'utf8',
      options: ['utf8_bin', 'utf8_esperanto_ci', 'utf8_general_ci', 'utf8_unicode_ci'],
    }, 
]

export const Engine = ['InnoDB', 'MyISAM', 'MEMORY', 'CSV', 'BLACKHOLE', 'ARCHIVE']